package com.xbongbong.saas.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.outstockproduct.pojo.dto.OutstockProductDeleteBatchDTO;
import com.xbongbong.pro.outstockproduct.pojo.dto.OutstockProductListDTO;
import com.xbongbong.pro.outstockproduct.pojo.dto.OutstockProductStatusListDTO;
import com.xbongbong.pro.outstockproduct.pojo.vo.OutstockProductDeleteBatchVO;
import com.xbongbong.pro.outstockproduct.pojo.vo.OutstockProductListVO;
import com.xbongbong.pro.outstockproduct.pojo.vo.OutstockProductStatusListVO;
import com.xbongbong.saas.domain.entity.OutstockProductEntity;
import com.xbongbong.saas.domain.entity.ProductStockUpdateEntity;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 出库单产品
 * @author 吴峰
 * @version v1.0
 * @date 2019/3/1 22:18
 * @since v1.0
 */
public interface OutstockProductService {

    /**
     * 获取出库单产品
     * @author 吴峰
     * @date 2019/3/1 22:19
     * @param outstockProductListDTO
     * @return com.xbongbong.pro.outstockproduct.pojo.vo.OutstockProductListVO
     * @throws XbbException 业务异常
     */
    OutstockProductListVO findOutstockProduct(OutstockProductListDTO outstockProductListDTO) throws XbbException;


    /**
     * 获取出库产品
     *
     * @param corpid 公司id
     * @param refId 关联单据id
     * @param type outstockTypeEnum
     * @return 出库产品
     * @throws XbbException
     */
    List<OutstockProductEntity> getAlreadyOutstockProduct(String corpid, Long refId, Integer type) throws XbbException;

    /**
     * 批量删除出库单关联产品
     * @author 吴峰
     * @date 2019/3/15 20:17
     * @param outstockProductDeleteBatchDTO
     * @return com.xbongbong.pro.outstockproduct.pojo.vo.OutstockProductDeleteBatchVO
     * @throws XbbException 业务异常
     */
    OutstockProductDeleteBatchVO deleteBatchByOutstockIdIn(OutstockProductDeleteBatchDTO outstockProductDeleteBatchDTO) throws XbbException;

    /**
     * 出库单修改库存
     * @param corpid
     * @return
     */


    Map<Long, ProductStockUpdateEntity> delUpdateStock(List<OutstockProductEntity> outstockProductList, String corpid, Set<Long> disableBatchProducts) throws XbbException;

    Map<Long, ProductStockUpdateEntity> addUpdateStock(List<OutstockProductEntity> addOutstockProductEntityList, String corpid) throws XbbException;
}

